package com.example.demo.error;

/**
 * 响应码枚举
 */

public enum ResultCode {

    // 这里可以根据多个场景设置不同的响应码，供前端判断问题并进行解释
    SUCCESS(200,"SUCCESS"),

    FAIL(400,"FAIL"),

    NOT_FOUND(401,"interface not found"),

    ERROR(500,"System Exception!"),

    DEFEAT(403,"AAA");

    public int code;

    public String message;

    ResultCode(int code, String message){
        this.code = code;
        this.message = message;
    }
}

